package br.com.o2solutions.siso.business.impl;

import org.springframework.beans.factory.annotation.Value;

import br.com.o2solutions.core.aop.business.annotation.ApplyRule;
import br.com.o2solutions.core.aop.business.annotation.Business;
import br.com.o2solutions.core.business.BasicBusinessSupport;
import br.com.o2solutions.core.exception.BusinessException;
import br.com.o2solutions.core.integration.repository.DataBaseIntegration;
import br.com.o2solutions.siso.business.rule.viatura.TipoViaturaInsertUpdateRule;
import br.com.o2solutions.siso.integration.entidade.TipoViatura;

/**
 * Classe responsável por implementar as operações negociais relacionadas ao
 * objeto {@link TipoViatura}.
 * 
 * @author ivan
 * @since 26/10/2010
 * 
 */
@Business("tipoViaturaBusiness")
public class TipoViaturaBusinessImpl extends BasicBusinessSupport<TipoViatura>{
	
	@Override
	@Value("#{tipoViaturaDAO}")
	public void setDataBaseIntegration(
			DataBaseIntegration<TipoViatura> dataBaseIntegration) {
		super.setDataBaseIntegration(dataBaseIntegration);
	}
	
	@Override
	@ApplyRule(rules = { TipoViaturaInsertUpdateRule.class })
	public void save(TipoViatura entity) throws BusinessException {
		getDataBaseIntegration().save(entity);
	}

}
